There are many cases in which shading processing, which is for eliminating a non-uniformity in brightness as caused by the lighting irregularity of a lighting device or distortion of a camera lens, is required as pre-processing for the reading of characters or for the recognition of other objects.
In conventional shading processing, a solid white reference paper having a uniform reflectivity is imaged and the resulting image is adopted as a shading pattern. When an object is imaged, a prescribed arithmetic operation (such as subtraction or division) is performed between image data indicative of the object and image data representing the shading pattern. Image data subjected to a shading correction by this operation is obtained.
With this conventional shading method, however, it is required that the reference paper be prepared in advance. Further, in a case where the object is a solid figure, such as a circular cylinder, the amount of light incident upon the image pick-up device differs depending upon the location of the object. This light is part of the illuminating light that has been reflected by the object. More specifically, most of the light reflected from the portion of the object facing the image pick-up device impinges upon the image pick-up device. However, at the side faces of the object or portions in the vicinity thereof, the illuminating light is not reflected toward the position of the image pick-up device. Most of this reflected light does not impinge upon the image pick-up device. Consequently, when an object having such a solid shape is photographed, the photographic image develops a shadow (meaning a portion that is comparatively dark). It is difficult to prevent such a variance in light and darkness with the conventional method using the aforesaid reference paper.
An object of the present invention is to provide a shading correction method, and an apparatus therefor, whereby it is possible to eliminate the effects of shadows, which are caused by solid shapes, without using a reference paper or the like.
Another object of the present invention is to make possible a correct shading correction even in a case where the position of an object to be imaged in the visual field of a camera has shifted from a reference position.